<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/survey_magic.js"></script>

<h3>Add a new item:</h3><br />

<form action="/clients/add_item" method="post" enctype="multipart/form-data">
	Item Title:
	<input name='data[Item][title]' id="ItemTitle" type="text" /><br />
	Type of item:
	<select name='data[Item][returns]' id="ItemReturns" onchange="itemTypeChange();">
		<option value='0'>Multiple Choice</option>
		<option value='1'>Text Response</option>
		<option value='2'>Audio Response</option>
		<option value='3'>GPS</option>
		<option value='4'>Point Touch</option>
	</select><br />
	<div id="prompt">
		Prompt:<br />
		<textarea name='data[Item][prompt]' id="ItemPrompt"></textarea><br />
		Image (optional):
		<input type="file" name="prompt_image" id="PromptImage" />
	</div>
	<input type="hidden" name='data[Item][survey_id]' value='<?php echo $s_id; ?>' />
	<input type='hidden' name="done" id="done" value='0' />
	
	<div id="ChoiceForm" name="choice_form">
		<input type="hidden" name="num_choices" id="NumChoices" value='1' />
		<div id="ChoiceFormChoices" name="choice_form_choices">
			Choice 1: <input type="text" name='choices[0]' id="Choices[0]" /><br />
		</div><!-- end choice form choices -->
		<input type='button' value="Add Choice" onclick="addChoice();" />
	</div> <!-- end choice form -->
	
	<input type="submit" name="NextButton" id="NextButton" value="Another Item" /><br />
	<input type='submit' name="DoneButton" id="DoneButton" value="Done" onclick="document.getElementById('done').value='1'" /><br />
</form>

<script language="javascript">
	document.getElementById("ItemTitle").focus();
</script>
